[rotor-light](https://notabug.org/basiliscos/cpp-rotor-light) is real-time
platform-neutral, C++ actor micro-framework for embedded systems with
supervising capabilities.

[rotor-light](https://notabug.org/basiliscos/cpp-rotor-light) is built with
the concurrency in the mind, i.e. independent entities (actors) interact
each other via messages.

[rotor-light](https://notabug.org/basiliscos/cpp-rotor-light) is adoption of
[rotor](https://github.com/basiliscos/cpp-rotor) framework for embedded systems.
The framework has no platform-dependent code, so, it can, however, be used as
is on host system, if you cautiously care about thread-safety.

## docs

Tutorial, concepts and API reference can be found [here](https://basiliscos.neocities.org/rotor-light)

## features

 - erlang-like hierarchical supervisors

 - asynchronous messaging with priorities

 - plaform-agnostic code (including timers)

 - C++17

 - no thread-safety

 - no allocations, no exceptions, no RTTI

 - non-intrusiveness

 - compile-time actor hierarchies 

## ping-pong messaging performance & .text section size


|                       | messages/second | binary size
|:---------------------:|:---------------:|:--------------:
| host (1)              | ~64.4M          | 10379 bytes
| STM32-H743ZI          | ~2.8M           | 14330 bytes
| stm32f407g-discovery  | ~0.52M          | 4336 bytes
| Arduino Uno R3 (2)    | ~29.5K          | 5714 bytes
| xilinx microblaze (3) | ~58.8K          | 42868 byes

All examples can be measured with `examples/ping-pong-throughput.cpp`,
compiled with `CMAKE_BUILD_TYPE=MinSizeRel` and the stripped

(1) Setup: Intel Core i7-8550U, Void Linux 5.15.

(2) Build with `-DROTOR_LIGHT_ACTOR=uint8_t`

(3) Zynq xc7z020clg400-1, QMTECH development board. Microblaze standard
config, hw mul/div instr. enabled, clocking is 50Mhz.

The performance numbers are approximate and they are not constant. Actually
message delivery depends on many factrors like number of queues,
number of actors, number of supervisors, number of subscriptions.

# examples

There are `ping-pong` and `blink-led` examples for different platforms.
If the examples are too trivial you can look at my [example]
(https://notabug.org/basiliscos/rotor-light-playground-stm32) of using
one-wire DHT11 sensor and UART for logging, everything is async &
interrupt-based `stm32f407g-discovery` board.

For `arduino` there is an [example]
(https://notabug.org/basiliscos/rotor-light-playground-arduino) too.

## license

MIT

## telegram

ru/en community for discussing
[rotor](https://github.com/basiliscos/cpp-rotor)
and [rotor-light](https://notabug.org/basiliscos/cpp-rotor-light)
is available at [cpp_rotor](https://t.me/cpp_rotor) group.

## Changelog

### 0.02 (xx-xxx-2022)
 - [feature] Add `ROTOR_LIGHT_QUEUE_SZ` build option, which allows
to measure maximum amount of messages in queue; mostly useful during
development

### 0.01 (07-Sep-2022)
 - initial version

